package com.lxu;

public class ThreadLocalDemo3 {

    private static int a = 10;

    public static void main(String[] args) {

        for (int i = 1; i < 50; i++) {
            int finalI = i;
            new Thread(() -> {
                if (finalI % 2 == 0) {
                    a = 20;
                }
                System.out.println("静态变量的值为：" + a);
            }).start();
        }
    }
}
